#include<stdio.h>
void Bubble_Sort(int arr[],int n)
{	
	for (int i = 0; i < n; i++)
	{
		int flag = 0;
		for (int j = 0; j < n - i - 1 ; j++)
		{
			if (arr[j] > arr[j + 1])
			{
				flag = 1;
				int tmp = arr[j + 1];
				arr[j + 1] = arr[j];
				arr[j] = tmp;
			}
		}
		if (flag == 0)
			break;
	}
}
int main()
{
	int arr[] = { 1,2,8,9,6,5,4,7,0,3 };
	int n = sizeof(arr)/sizeof(arr[0]);
	//printf("%d ", n);
	Bubble_Sort(arr,n);
	for (int i = 0; i < n; i++)
	{
		printf("%d ", arr[i]);
	}
	return 0;
}